/* style.css: 全局通用样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'KaiTi';
    src: url('../font/STKAITI.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    min-height: 100vh;
    background: #fff;
    font-family: 'KaiTi', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222;
    line-height: 1.5;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* 防止横向滚动 */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* header头部 */
header {
    padding: 16px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color-start), var(--primary-color-end));
    color: white;
    border-radius: 8px;
    text-shadow: 
        1px 1px 1px rgba(0, 0, 0, 0.3),
        2px 2px 1px rgba(255, 255, 255, 0.7),
        3px 3px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0; /* 防止header被压缩 */
}

/* main主体内容 */
main {
    flex: 1 0 auto;
    margin: 20px;
    padding: 16px;
    padding-bottom: calc(var(--footer-height) + 20px); /* 给底部留出空间 */
    background: var(--main-bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* footer固定底部导航 */
footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: var(--footer-height);
    background-color: var(--main-bg-color);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    margin: 0 var(--footer-margin) var(--footer-margin) var(--footer-margin);
    display: flex;
    justify-content: center;
    z-index: 1000;
    box-sizing: border-box;
}


/* 颜色、间距等全局变量可以放这里 (CSS变量) */
:root {
    --main-bg-color: #f5f5f5;
    --primary-color-start: #1a73e8;
    --primary-color-end: #0d47a1;
    --footer-height: 60px;
    --footer-margin: 10px;
}

